/**
 * Created by zheng on 2018/1/30.
 */``
import Vue from 'vue';

 let button = require('../../buttom/index.vue');

export default {
  name: 'ZgTableHeader',
  component: {
    button
  },
  props: {
    store: {
      type: Object,
    }
  },
  data(){
    return {
    }
  },
  hello () {
    alert('This is the message.')
  },
  render: function render(h) {
    let _self = this;
    return (
      <table
        class="zh-table-header"
        cellspacing="0"
        cellpadding="0"
        border="0">
      <thead>
      <tr>
      {
        this._l(this.store.state.columns, column =>
        <th
          style={{
            width: (column.width?column.width:100) +'px',
            display: (column.prop=='hidden'?'none':''),
          }}>
          { column.label }&nbsp;
        </th>)
      }
      </tr>
      </thead>
      </table>
    )
  }
}
